-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[rcore] Use FLAG_*
macros where possible
#5169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
3255f2b
to
4fbf247
Compare
4fbf247
to
70a06f9
Compare
FLAG_*
macros where possible
@JohnnyCena123 I've been thinking about this update and I'm merging it but I'm concerned about the macro So, code needs to be updated from: if (FLAG_CHECK(CORE.Window.flags, FLAG_WINDOW_MINIMIZED) > 0) { } to if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED)) { } or depending the case if (!FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED)) { } Please, could you review it? |
@JohnnyCena123 Did you see my previous message? I can implement it if you can't. |
sorry, I must've missed it. I will do that tomorrow if I remember |
@raysan5 i remembered! |
src/platforms/rcore_android.c
Outdated
{ | ||
if ((FLAG_CHECK(source, AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK) || | ||
(FLAG_CHECK(source, AINPUT_SOURCE_GAMEPAD) == AINPUT_SOURCE_GAMEPAD)) | ||
if ((FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed the extra ==
check if we already check for the flag set?
src/platforms/rcore_android.c
Outdated
// Handle gamepad button presses and releases | ||
if ((FLAG_CHECK(source, AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK) || | ||
(FLAG_CHECK(source, AINPUT_SOURCE_GAMEPAD) == AINPUT_SOURCE_GAMEPAD)) | ||
if ((FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed the extra ==
check if we already check for the flag set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i probably missed that, i only searched for == 0
38410b5
to
a49f79b
Compare
No description provided.